package shujia.day02.ketang;
import java.util.Scanner;

/*
    键盘录入两个数据，返回两个数中的较大值

 */
public class FunctionTest1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入第一个数值：");
        int n1 = sc.nextInt();
        System.out.println("请输入第二个数值：");
        int n2 = sc.nextInt();
        int res = maxNumber(n1, n2);
        System.out.println("最大值为："+res);
    }


    public static int maxNumber(int a,int b){
        if(a>b){
            return a;
        }else {
            return b;
        }
    }

}
